/* Copyright (c) 2004-2022 peigen.info. All rights reserved. */

package info.peigen.hotpot.common.core.domain;

import info.peigen.hotpot.common.core.order.Order;

/**
 * <b>(Domain)</b>
 * 领域对象接口
 *
 * @author Peigen
 * @version 1.0.0
 * @since 2021/7/27
 */
public interface Domain {
    /**
     * 创建领域对象
     *
     * @param order order
     *
     * @return Domain
     */
    default Domain create(Order order) {
        return null;
    }

    /**
     * 销毁领域对象
     */
    default void destroy() {
    }

    /**
     * 校验领域对象
     */
    void check();
}